using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace DeliciousToolbar
{
    public class RecentBookmark
    {
        private string Url;
        public string Description;
        public Bitmap Favicon;

        public RecentBookmark(string url, string description)
        {
            Url = url;
            Description = description;
            Favicon = null;
        }

        public Uri FaviconUri
        {
            get
            {
                return new Uri(string.Format("{0}://{1}/favicon.ico", Uri.Scheme, Uri.Host));
            }
        }

        public Uri Uri
        {
            get
            {
                if (Url.StartsWith("http"))
                    return new Uri(Url);
                else
                    return new Uri(string.Format("http://{0}", Url));
            }
        }
    }
}
